package com.alibaba.dubbo.demo.web.service.impl;

import java.util.Date;

import com.alibaba.dubbo.config.annotation.Service;
import com.alibaba.dubbo.demo.web.entity.User;
import com.alibaba.dubbo.demo.web.service.UserService;

@Service(version = "1.0.0")
public class UserServiceImpl implements UserService {

    @Override
    public boolean login(String userName, String password) {
        // TODO
        return true;
    }

    @Override
    public boolean logout(String token) {
        // TODO
        return true;
    }

    @Override
    public User getDetail(int id) {
        User user = new User();
        user.setId(id);
        user.setUserName("Hello World");
        user.setPassword("4ed448cc80ce62ad8b8a352bb2c4951a40e663f3");
        user.setAge(28);
        user.setAddress("New York, USA");
        user.setRegisterTime(new Date());

        return user;
    }

}
